package com.maserb.monitor.service.schoolStudent;

import com.maserb.monitor.entity.JwOrgEntity;
import com.maserb.monitor.entity.UserEntity;
import com.maserb.monitor.entity.schoolStudent.SchoolStudentEntity;
import com.maserb.monitor.entity.schoolStudent.SchoolStudentImportModel;
import com.maserb.monitor.entity.schoolStudent.SchoolStudentParentEntity;
import com.maserb.monitor.entity.schoolStudent.SchoolStudentParentImportModel;
import com.maserb.monitor.repository.schoolStudent.SchoolStudentRepository;
import com.maserb.monitor.service.base.JpaSpecificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;


public interface SchoolStudentService extends JpaSpecificationService<SchoolStudentRepository, SchoolStudentRepository, SchoolStudentEntity, String> {

    Page<SchoolStudentEntity> findAll(Pageable pageable,String userId, String name, String orgId,String studentId,String schoolId,String sex);

    List<SchoolStudentEntity> findAll(String userId,String name, String orgId, String studentId, String schoolId, String sex);

    Integer countByClass(String classId);

    List<SchoolStudentEntity> findByClazzId(String clazzId);

    List<SchoolStudentEntity> studentListByNameOrId(String clazzId,String nameOrId);

    List<SchoolStudentEntity> findByParent(SchoolStudentParentEntity parent);

    List<JwOrgEntity> getOrgListByParent(SchoolStudentParentEntity parent);

    SchoolStudentEntity findByStudentNo(String studentNo);

    SchoolStudentEntity getStudentScore(SchoolStudentEntity student);

    List<SchoolStudentEntity> findByClazzIdWithScore(String clazzId);

    List<SchoolStudentEntity> findByUser(UserEntity user);

    Page<SchoolStudentEntity> findAllByUser(Pageable pageable, String userId,String clazzId,String name,String studentId);

    void save(List<SchoolStudentEntity> list,String orgId,String clazzId,String userId);

    void save(List<SchoolStudentImportModel> list);

    void saveTeacher(List<SchoolStudentImportModel> list);

    void saveParent(List<SchoolStudentParentImportModel> list);

    List<SchoolStudentEntity> findByClazzName(String clazzName);

    void initParent();
}